import { axios } from '@/utils/request'

const api = {
  company: '/shifts/company'
}

export function getCompanyList (parameter) {
  return axios({
    url: api.company + '/list',
    method: 'get',
    params: parameter
  })
}

export function saveCompany (parameter) {
  return axios({
    url: api.company + (parameter.companyCode > 0 ? '/update' : '/save'),
    method: 'post',
    data: parameter,
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    }
  })
}

export function delCompany (parameter) {
  return axios({
    url: api.company + '/remove',
    method: 'post',
    params: parameter
  })
}
export function changCompanyStatus (parameter) {
  return axios({
    url: api.company + '/displayByPrimaryKey',
    method: 'post',
    params: parameter
  })
}

export const companyExport = api.company + '/export'
